CC=gcc
CFLAGS=-Wall -pedantic -g -lpthread -std=gnu99 -DMTU=1497 -lrt

all: virtual link.o test/link

link.o: link.c link.h
	$(CC) -c $(CFLAGS) link.c -o link.o

virtual: virtual.c virtual.h link_virtual.h link.o
	$(CC) $(CFLAGS) virtual.c link.o -o virtual

test/link: test/link.c link.o 
	$(CC) $(CFLAGS) -I. link.o test/link.c -o test/link
	test/link
	hexdump -C /tmp/link0
	hexdump -C /tmp/link1
	hexdump -C /tmp/link2

